/* TYPOGRAPHY */

body {
  background: var(--bg1);
}

@font-face {
  font-family: 'IBM Plex Sans';
  src: url("assets/fonts/IBM_Plex_Sans/IBMPlexSans-Regular.ttf") format("truetype");
}

@font-face {
  font-family: Epilogue;
  src: url("assets/fonts/Epilogue/Epilogue-VariableFont_wght.ttf") format("truetype");
}

html {font-size: 87.5%;} /*14px*/

/* CSS Vars */
:root {
  --fn-dropshadow:0 1px 2px rgba(0,0,0,0);
  --contrast-normal: var(--bg2);
  --light-theme-lines: var(--contrast-darkest);
  --dark-theme-lines: var(--contrast-lighter);
  --lines: var(--dark-theme-lines);
  --sidenav-width: 240px;
  --btn-default-bg: var(--alt-bg2);
  --hover-bg: var(--lines) !important;
  --font-family-body: 'IBM Plex Sans';
}

body {
  font-family: var(--font-family-body), sans-serif;
  font-weight: 400;
  line-height: 1.65;
  /*min-width: 320px;*/
}

p {margin-bottom: 1.15rem;}


h1, h2, h3, h4, h5 {
  margin: 2.75rem 0 1.05rem;
  margin: 0;
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 400;
  line-height: 1.15;
}

h1 {
  margin-top: 0;
  font-size: 2.488em;
}
h1 { color: var(--fg1);}
h1, h2{
  font-family: 'Epilogue', sans-serif;
  font-weight: 500;
}

h2 {font-size: 2.074em;}

h3 {font-size: 1.728em;}

h4 {font-size: 1.44em;}

h5 {font-size: 1.2em;}

small, .text_small {font-size: 0.833em;}

.text-extra-small{ font-size: x-small;}

span.code{
  font-family:'Inconsolata';
  opacity: 0.75;
  background: rgba(255,255,255,0.1);
}

/*
 * Variables 
 * height 36px
 *
 * */

/* MENUS */
.mat-menu-item {
  line-height:36px !important;
  height:36px !important;
}


/* Cards */

.mat-card{
  border:solid var(--highlights) rgba(255,255,255,0.025);
  /*border-top-size:var(--highlights);*/
}

entity-table .mat-card,
entity-form .mat-card{
  padding:0 !important;
}

.form-card.mat-card {
  max-width:960px;
  margin:0 auto;
}

entity-form .mat-card > *,
entity-table .mat-card > *{
  padding:16px !important;
  margin:0 !important;
}

.mat-card > .no-padding{
  padding:0 !important;
}

.mat-card-title-text{
  margin:0 !important;
}

.mat-toolbar .mat-button{
  height:36px !important;
  margin: 0 4px;
}

.fn-toolbar{
  background:var(--alt-bg1);
}

.fn-toolbar.icons-only{
  padding:8px !important;
}

/* Special Override Classes */

/* FreeNAS Specific */

button.menu-toggle .mat-icon{
  position:relative;
  top:6px;
  right:-10px;
}

/* This element is part of entity-table.
 * It currently uses css to do artificially 
 * put itselt inside the title bar.
 * This needs to be changed in the markup 
 * instead of using this type of hack */
#filter{
  position: static !important;
  margin-top:-10px; /* The form field reserves too much space in mat-toolbar. This wins some of the screen back */
  text-align:right;
  max-height:38px;
}

entity-table .multiactions-title{
  margin-bottom: 16px ;
}

entity-table .mat-toolbar.mat-card-toolbar{
  position:relative;
  z-index:2;
}
/* Elements with shadows */
.datatable-header,
entity-table .mat-toolbar.mat-card-toolbar{
  box-shadow:var(--fn-dropshadow);
}

/*********************************************************************/
/* Dematerialize Form Fields :) */
.form-element{
  margin: 16px 0;
  text-align:left;
}
.form-element .label{
}

.form-element .label.input-text,
.form-element .label.input-select{
  font-size: x-small;
}

.form-element .label-container {
  margin-bottom: 4px;
  padding: 4px 0;
}


.borderless{
  border: none !important;
}

.mat-divider{
  background: var(--lines) !important;
  opacity: 1 !important;
}

.fieldset {
  padding-bottom: 24px;
}
.fieldset.empty-fieldset {
  padding-bottom: 0px;
}

.full-width{
  position: relative;
}

.form-element.form-combobox .mat-form-field,
.form-element.form-ip-netmask .mat-form-field,
.form-element.form-combobox .mat-menu-trigger,
.form-element .mat-form-field-wrapper,
.form-element input[type = "password"],
.form-element input[type = "email"],
.form-element input[type = "text"],
.form-element input[type = "number"],
.form-element textarea,
.form-element select{
  background-color: var(--bg1);
  color: var(--fg1);
  border: solid 1px var(--lines);
  padding: 8px;
  box-sizing: border-box;
  color: var(--fg1);
}

.form-element,
#password,
.form-element.form-combobox .mat-form-field,
.form-element.form-ip-netmask .mat-form-field,
.form-element.form-combobox .mat-menu-trigger,
.form-element .mat-form-field-wrapper,
.form-element input[type = "password"],
.form-element input[type = "email"],
.form-element input[type = "text"],
.form-element input[type = "number"],
.form-element textarea,
.form-element select{
  width: calc(100% - 24px) !important;
  line-height: normal !important; 
  min-height: 33px;
}

entity-form-list .list-action-block-wrapper .form-element,
entity-form-list .list-action-block-wrapper #password,
entity-form-list .list-action-block-wrapper .form-element.form-combobox .mat-form-field,
entity-form-list .list-action-block-wrapper .form-element.form-ip-netmask .mat-form-field,
entity-form-list .list-action-block-wrapper .form-element.form-combobox .mat-menu-trigger,
entity-form-list .list-action-block-wrapper .form-element .mat-form-field-wrapper,
entity-form-list .list-action-block-wrapper .form-element input[type = "password"],
entity-form-list .list-action-block-wrapper .form-element input[type = "email"],
entity-form-list .list-action-block-wrapper .form-element input[type = "text"],
entity-form-list .list-action-block-wrapper .form-element input[type = "number"],
entity-form-list .list-action-block-wrapper .form-element textarea,
entity-form-list .list-action-block-wrapper .has-tooltip mat-form-field.full-width,
entity-form-list .list-action-block-wrapper .form-element select{
  width: 100% !important;
}

/* Combo Box */
.form-element.form-combobox .label-container{
  margin-bottom: 0;
  padding-bottom: 3px;
}

.form-element.form-combobox .mat-form-field-wrapper input,
.form-element.form-combobox .mat-form-field-wrapper{
  background-color: unset;
  border: unset;
  padding: unset;
}

.form-element.form-combobox .mat-form-field{
  max-width: calc(100% - 58px) !important;
  height: 33px;
  margin-right: 1px;
  padding: 0 8px;
}

.form-element.form-combobox .mat-menu-trigger:hover {
  cursor: pointer;
}

.form-element.form-combobox .mat-menu-trigger{
  position: relative;
  top: -9px;
  padding: 9px 2px 8px;
}

.form-element.form-combobox .mat-menu-trigger .mat-icon{
  position: relative !important; 
  top: 7px !important;
}

.form-element.form-combobox .mat-form-field,
.form-element.form-combobox .mat-menu-trigger{
  height: 33px;
}

/* IP w/Netmask*/
.form-element.form-ip-netmask .mat-form-field {
  max-height: 33px;
}

.form-element.form-ip-netmask .mat-form-field-wrapper input,
.form-element.form-ip-netmask .mat-form-field-wrapper{
  background-color: unset;
  border: unset;
  padding: unset;
}

.form-element.form-combobox .mat-select-trigger{
  position: relative;
  top: 2px;
  padding: 9px 2px 8px;
}

/* Form List */
.form-list .form-list-item {
  position: relative;
  right: 18px;
  top: 50%;
}

.form-list .list-action-inline {
  display: flex;
  align-items: center;
  justify-content: center;
}

.form-list .list-action {
  display: flex;
  justify-content: right;
}

/* Chips */
.form-element .mat-chip{
  font-size: smaller !important;
  padding: 1px 16px 0 !important;
}

/* Login Form */
.login-form .form-element .mat-form-field-wrapper{
  width: 100% !important;
  min-height: unset;
  max-height: 33px;
}

.login-form .form-element .mat-form-field-wrapper input{
  background: none;
  border: none;
  margin: 0;
  padding: 0 0 2px 0;
}

.login-form .form-element .mat-form-field-prefix .mat-icon {
  font-size: 16px;
}

.login-form .form-element .mat-form-field-prefix{
  margin-bottom: 2px;
}

.login-form .form-element.username .mat-form-field-prefix{
  top: -5px;
}

.login-form .form-element.password .mat-form-field-prefix{
  top: -16px;
}

.form-element textarea{
  min-width: calc(100% - 24px);
  max-width: calc(100% - 24px);
  min-height: 96px;
}

.form-element input[type = "password"],
.form-element .has_toggle_pw input {
  position: relative;
  top: -6px;
  height: inherit;
  display: inline;
}

.form-element button.toggle_pw {
  position: absolute;
  bottom: -3px;
  right: 32px;
}

.form-element button.toggle_pw i{
  font-size: 22px;
  opacity: 0.75;
}

.form-element .mat-form-field-type-mat-select .mat-form-field-wrapper {
  min-height: 33px;
  width: 100% !important;
}

.form-element.form-explorer .mat-form-field-wrapper{
  padding-left: 0;
}

.form-element.form-explorer .mat-form-field-wrapper,
.form-element.form-explorer .mat-form-field-flex,
.form-element.form-explorer .mat-form-field-flex input {
  border: none;
}

.form-element.form-combobox .mat-form-field-flex,
.form-element.form-combobox .mat-form-field-flex input {
  border: none;
}

.margin-for-error{
  position: static !important;
}

.mat-checkbox-frame{
  border-color: var(--fg2) !important;
}

.mat-checkbox{
  opacity: 0.75;
}

tooltip button i{
  opacity: 0.5;
}

.label-container tooltip {
  margin: 0 0 4px 4px;
}

.tooltip .material-icons{
  font-size: 16px !important;
}

/* Normalize mat-select */
.mat-form-field-label-wrapper,
.mat-form-field-underline,
.mat-form-field-subscript-wrapper {
  display: none;
}

.mat-form-field-appearance-legacy .mat-form-field-infix {
  padding: 0;
  border: 0;
}

/* Buttons */
.mat-button, .mat-flat-button {
  border-radius : 0 !important;
  text-transform: capitalize !important;
}

.mat-button[disabled] span.mat-button-wrapper,
.mat-flat-button[disabled] span.mat-button-wrapper{
  opacity: 0.5;
}

.mat-card-actions .mat-button, 
.mat-card-actions .mat-flat-button{
  background:var(--btn-default-bg) !important;
  background-color:var(--btn-default-bg) !important;
  color:var(--fg2) !important;
}

.mat-button, .mat-flat-button,
button.mat-button.btn-default, 
button.mat-button.mat-default, 
.mat-card-actions button.mat-default, button.mat-default,
button.mat-button.mat-accent.btn-default,
button.mat-button[type="button"]:not(button.mat-primary) {
  background:var(--btn-default-bg) !important;
  background-color:var(--btn-default-bg) !important;
  color:var(--fg2) !important;
}

button.mat-button[type="button"]:hover,
button.mat-button.mat-accent[type="button"]:hover{
  background-color: var(--alt-bg1) !important;
  color: var(--fg2) !important;
}

button.mat-button.mat-primary{
  background-color:var(--primary) !important;
  color:var(--primary-txt) !important;
  opacity: 1 !important;
}

button.mat-button.mat-accent{
  background-color:var(--accent) !important;
  color:var(--accent-txt) !important;
  opacity: 1 !important;
}

/* Menus */

.mat-option:hover:not(.mat-option-disabled),
.sidenav-link:hover,
.slide-in-nav-item:hover,
.mat-menu-item:hover,
.mat-button:hover{
  background-color: var(--hover-bg) !important;
}

/* Nested Cards */
.mat-card .form-card.mat-card{
  box-shadow: unset; 
  border: none;
}

/* Top bar fixes */
.topbar .mat-icon-button,
.topbar .mat-icon-button .mat-icon[alt="iXsystem logo"]{
  color: var(--topbar-txt) !important;
}

/* Material Cards*/
.mat-card{
  padding: 0 !important;
  position: relative;
}

.mat-card .mat-toolbar-row,
.mat-card .mat-card-content > div,
.mat-card .mat-card-footer {
  padding: 16px;
}

.mat-card .mat-toolbar{
}

.mat-card .mat-toolbar-row{
  border-bottom: solid 1px var(--lines);
  min-height: 48px !important;
  height: 56px;
}

.mat-card .mat-toolbar-row .actions{
  position: absolute;
  right: 16px;
}

.mat-card .mat-card-footer .actions button{
  margin-right: 8px;
}

.mat-card-content{
  /*padding-bottom: 80px;*/
}

.mat-card .mat-card-footer {
  width: 100%;
  padding:0 16px;
  margin-top: 8px;
}

/* Material Tables */
table.mat-table {
  width: 100%;
  background-color: var(--bg2) !important;
}

.mat-table thead th{
  background-color: var(--contrast-darker);
  background-color: rgba(0,0,0,0.1);
  opacity: 0.75;
  vertical-align: middle;
}

tr.mat-header-row,
.mat-table thead tr{
  max-height: 48px;
  height: 48px;
}

.mat-row, 
.mat-header-row, 
.mat-footer-row, 
th.mat-header-cell, 
td.mat-cell, 
td.mat-footer-cell{
  border-bottom-color: var(--lines) !important;
}

mat-row, 
mat-header-row, 
mat-footer-row, 
th.mat-header-cell, 
td.mat-cell, 
td.mat-footer-cell{
  color: var(--fg2) !important;
  vertical-align: middle;
  position: relative;
}

td.mat-cell .mat-icon{
  position: absolute;
  top: calc(50% - 12px);
}

.mat-row:hover,
tr.mat-row:hover {
  background: rgba(0,0,0,0.1);
  cursor: pointer;

}
/* Material Lists */
.mat-list-item{
  border-bottom: solid 1px var(--lines) !important;
}

.value,
.mat-list-item .value{
  font-weight: 500;
}

.label,
.mat-list-item .label{
  margin-right: 16px;
}

mat-card.mat-card .mat-list-base{
  padding-top: 0;
}

/* This should probably be implemented as a component */
.page-title{
  width: calc(100% - 64px);
  margin: 0 auto;
  color: var(--fg1);
}


